<?php

/**

 * 注销

 *

 *

 *

 * * @网店运维 (c) 2015-2018  Inc. (http://www.shopwwi.com)
 * @license    http://www.shopwwi.c om
 * @link       交流群号：111731672
 * @since      网店运维提供技术支持 授权请购买shopnc授权

 */



//use Shopnc\Tpl;



defined('InShopNC') or exit('Access Invalid!');



class logoutControl extends mobileMemberControl {



    public function __construct(){

        parent::__construct();

    }



    /**

     * 注销

     */

    public function indexOp(){

        if(empty($_POST['username']) || !in_array($_POST['client'], $this->client_type_array)) {

            output_error('参数错误');

        }



        $model_mb_user_token = Model('mb_user_token');



        if($this->member_info['member_name'] == $_POST['username']) {

            $condition = array();

            $condition['member_id'] = $this->member_info['member_id'];

            $condition['client_type'] = $_POST['client'];

            $model_mb_user_token->delMbUserToken($condition);

            output_data('1');

        } else {

            output_error('参数错误');

        }

    }



}

